-
Notifications
You must be signed in to change notification settings - Fork 0
[Refacto] Using UUID on model #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refacto] Using UUID on model #138
Conversation
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
…ting sets by name in groups Signed-off-by: Thang PHAM <phamthang37@gmail.com>
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
| ], | ||
| "setsGroups": [ | ||
| { | ||
| "name": "IEEE14_TCB_1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming with prefix IEEE14 for TCB is the demand of @gautierbureau
| "family": "VOLTAGE", | ||
| "model": "TapChangerBlockingAutomaton", | ||
| "setGroup": "TCB_2_4", | ||
| "setGroup": "IEEE14_TCB_1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adapt to the naming with prefix IEEE14 for TBC (demanded by @gautierbureau )
src/main/resources/db/changelog/changesets/changelog_20251120T230357Z.xml
Outdated
Show resolved
Hide resolved
src/main/resources/db/changelog/changesets/changelog_20251120T230357Z.xml
Show resolved
Hide resolved
src/main/java/org/gridsuite/mapping/server/service/implementation/ModelServiceImpl.java
Show resolved
Hide resolved
src/main/java/org/gridsuite/mapping/server/service/implementation/ModelServiceImpl.java
Show resolved
Hide resolved
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
src/main/java/org/gridsuite/mapping/server/model/ModelParameterEntity.java
Outdated
Show resolved
Hide resolved
| @Table(name = "model_parameter", indexes = {@Index(name = "model_parameter_name_index", columnList = "name")}) | ||
| public class ModelParameterEntity implements Serializable { | ||
|
|
||
| @EqualsAndHashCode.Include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NO, see the above explaination.
src/main/java/org/gridsuite/mapping/server/model/ModelSetsGroupEntity.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
…facto_entities' into rework_on_model_by_using_uuid_refacto_entities
|



PR Summary
Using uuid (instead of name) as primary key for all model-related entities
What did in this PR:
For entities which define instants (
Model,ModelSetsGroupEntity,ModelParameterSetEntity,ModelParameterEntity), we remove all id classes, i.e.ModelParameterId,ModelParameterSetId,ModelSetsGroupIdwhich contain duplicated infos, and replace byidwith type UUIDFor entities which define definitions (
ModelParameterDefinitionEntity,ModelVariableDefinitionEntity,ModelVariableSetEntity), we addidfield beside the exisitingnamefield.All relations are now modelized through ids but we keep
namefor all entities.Add
idfields for corresponding dtos to round-tripidfor update actionsAdapt existing implementation in
ModelServiceImplfor importing correctly model in json format in taking into account the reuse of parameter definitions, and variable definitions.Add models in json format and bash script into
/resourceto bootstrap initial modelsRelated PR front : gridsuite/griddyna-app#164